worktree: conditionally allow worktree on VFS-enabled repos#868
worktree: conditionally allow worktree on VFS-enabled repos#868tyrielv wants to merge 1 commit intomicrosoft:vfs-2.53.0from
Conversation
dscho
left a comment
There was a problem hiding this comment.
Looks pretty good, even if I left a lot of suggestions (which boil down to only a few, in essence, though). This is very close. Thank you!
bb6390a to
2337249
Compare
mjcheetham
left a comment
There was a problem hiding this comment.
Just a nit about commenting where 95 comes from for core.gvfs in a test.
nit-nit: Should we also squash the addressing feedback commit into the main commit (with updated message)? I see Copilot as a co-author, and I've found it sadly doesn't like to amend or rebase without being explictly told to keep commits looking 'nice' 😄
Probably. Seeing as I blocked Tyrie for so long, I planned on doing that during the next rebase, though. |
dscho
left a comment
There was a problem hiding this comment.
@tyrielv while I agree with @mjcheetham on both points (the magic "95" constant, and avoiding an "add-on-top" fixup commit), I feel bad for forcing you to wait for my review for so long, so I'd offer to merge this as-is and make the follow-up fixes myself during the next rebase. Or you can make those changes if you want, and have the time. Up to you.
Add GVFS_SUPPORTS_WORKTREES flag (1<<8) to core.gvfs bitmask. When set, allow git worktree commands to run on VFS-enabled repos instead of blocking them with BLOCK_ON_VFS_ENABLED. Force --no-checkout during worktree add when VFS is active so ProjFS can be mounted before files are projected. Support skip-clean-check marker file in worktree gitdir: if .git/worktrees/<name>/skip-clean-check exists, skip the cleanliness check during worktree remove. This allows VFSForGit's pre-command hook to unmount ProjFS after its own status check, then let git proceed without re-checking (which would fail without the virtual filesystem). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2337249 to
5f289aa
Compare
|
@dscho No problem, I've squashed and updated the test and gvfs.h comment per feedback. |
Add GVFS_SUPPORTS_WORKTREES flag (1<<8) to core.gvfs bitmask. When set, allow git worktree commands to run on VFS-enabled repos instead of blocking them with BLOCK_ON_VFS_ENABLED.
Force --no-checkout during worktree add when VFS is active so ProjFS can be mounted before files are projected.
Support skip-clean-check marker file in worktree gitdir: if .git/worktrees//skip-clean-check exists, skip the cleanliness check during worktree remove. This allows VFSForGit's pre-command hook to unmount ProjFS after its own status check, then let git proceed without re-checking (which would fail without the virtual filesystem).
The corresponding change in VFSForGit is microsoft/VFSForGit#1911